接下來要建table,做一些題目
create table employee (
empID decimal(5) primary key,
emp_name varchar(50) not null,
hiredate date not null,
salary int not null,
deptID decimal(5) not null,
title varchar(30) not null,
mgrID decimal(5)
);
create table department(
deptID decimal(5) primary key,
deptname varchar(30) not null,
cityID char(3) not null
);
create table city(
cityID char(3) primary key,
city_name varchar(30) not null,
);
create table grade(
job_level char(1) primary key,
lowest int not null,
highest int not null
);
SELECT [empID]
,[emp_name]
,[hiredate]
,[salary]
,[deptID]
,[title]
,[mgrno]
FROM [Testing].[dbo].[emp]
SELECT [deptID]
,[deptname]
,[cityID]
FROM [Testing].[dbo].[dept]
SELECT [job_level]
,[lowest]
,[highest]
FROM [Testing].[dbo].[grade]